package com.example.demo.mvvm.ui.fragment;

import android.os.Bundle;

import com.example.demo.mvvm.BR;
import com.example.demo.mvvm.R;
import com.example.demo.mvvm.databinding.FragmentMainHomeBinding;
import com.example.demo.mvvm.ui.base.BaseFragment;
import com.example.demo.mvvm.ui.vm.fragment.HomeFragmentVm;
/**
 * Created by 80711 on 2018/5/16.
 */

public class HomeFragment extends BaseFragment<FragmentMainHomeBinding> {

    private HomeFragmentVm homeFragmentVm;

    public static HomeFragment newInstance() {

        Bundle args = new Bundle();

        HomeFragment fragment = new HomeFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected void init() {
        homeFragmentVm = new HomeFragmentVm(databing);
        setViewVM(BR.viewModel , homeFragmentVm);
        databing.pullRefresh.autoRefresh();
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_main_home ;
    }
}
